import request from '@/utils/request'

export function showProductList1(query) {
  return request({
    url: '/product/1/show',
    method: 'get',
    params: query
  })
}

export function showProductList2(query) {
  return request({
    url: '/product/2/show',
    method: 'get',
    params: query
  })
}

export function showProductList3(query) {
  return request({
    url: '/product/3/show',
    method: 'get',
    params: query
  })
}

export function showItemList(productId) {
  return request({
    url: '/product/item/list',
    method: 'get',
    params: { 'productId': productId }
  })
}

export function saveItem(data) {
  return request({
    url: '/product/item/save',
    method: 'post',
    data
  })
}

export function toggleItemUpper(data) {
  return request({
    url: '/product/item/upper',
    method: 'post',
    data
  })
}

export function removeItem(itemId) {
  return request({
    url: '/product/item/remove',
    method: 'get',
    params: { 'itemId': itemId }
  })
}

export function saveProduct1(data) {
  return request({
    url: '/product/1/save',
    method: 'post',
    data
  })
}

export function saveProduct2(data) {
  return request({
    url: '/product/2/save',
    method: 'post',
    data
  })
}

export function saveProduct3(data) {
  return request({
    url: '/product/3/save',
    method: 'post',
    data
  })
}

export function toggleUpper(data) {
  return request({
    url: '/product/upper',
    method: 'post',
    data
  })
}

export function deleteProduct(productId) {
  return request({
    url: '/product/remove',
    method: 'get',
    params: { 'productId': productId }
  })
}

export function getProduct(query) {
  return request({
    url: '/product/get',
    method: 'get',
    params: query
  })
}

export function getProductList() {
  return request({
    url: '/product/list',
    method: 'get'
  })
}

export function getProductItemVO(query) {
  return request({
    url: '/product/item/get',
    method: 'get',
    params: query
  })
}
